package com.tecode.mapper;

import com.tecode.bean.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface AdminMapper {
    int deleteByPrimaryKey(Integer adminid);

    int insert(Admin record);

    int insertSelective(Admin record);

    Admin selectByPrimaryKey(Integer adminid);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin record);

    Admin adminLogin(String adminname);

    List<Admin> getAdminAll();


    Integer adminadd(@Param("adminname")String adminName, @Param("password") String password, @Param("adminRole") int adminRole);

    Admin adminSerch(int adminid);

    Integer adminUpdate(@Param("adminname")String adminName, @Param("password") String password, @Param("adminRole") int adminRole, @Param("adminid") int adminid);

    List<Admin> serchAll(String serch);

    void freeze(int id);

    void freeze2(int id);

    void deletAll(@Param("list")Integer[] list);

    /**
     * 小程序访问增加方法
     */
    int visit(Date creatTime);


    Integer updatePermission(@Param("adminid") int adminid,@Param("adminname")String adminName,@Param("adminRole") int adminRole);
}